package dk.hojlind.hackhunt.control;

import dk.hojlind.hackhunt.model.ClientSocket;

public class Handler {

	//Public variables

	//Private variables
	String adress;
	int port;
	String user = "none";
	String pass = "none";
	String ownAddress = "0";
	ClientSocket socket;
	int maxStringSize = 50;


	int minStringSize = 1;
	String error;
	String success;
	String result;
	String end = "\r \n . \r \n";

	//Default Constructor
	public Handler()
	{
		
	}
	
	//Constructor
	public Handler(String adress, int port)
	{
		this.adress = adress;
		this.port = port;
	}
	
	public boolean check(String checkee) {
		
		if(maxStringSize >= checkee.length() && checkee.length() >= minStringSize && !checkee.contains(";"))
		{
			return true;
		}
		else
		{
			return false;
		}
	}
	
	public String getAdress() {
		return adress;
	}
	
	public int getPort() {
		return port;
	}

	public String getUser() {
		return user;
	}

	public String getPass() {
		return pass;
	}
	
	public String getOwnAddress() {
		return ownAddress;
	}

	public void setAdress(String adress) {
		this.adress = adress;
	}

	public void setPort(int port) {
		this.port = port;
	}

	public void setUser(String user) {
		this.user = user;
	}

	public void setPass(String pass) {
		this.pass = pass;
	}

	public void setOwnAddress(String ownAdress) {
		this.ownAddress = ownAdress;
	}
}
